package com.example.sherlockzhong.plush_v2.CardBeans;

/**
 * Created by DosonLeung on 2014/8/8.
 */

import android.widget.ImageView;
import android.widget.TextView;

import com.example.sherlockzhong.plush_v2.R;
import com.example.sherlockzhong.plush_v2.View.CardHorizontalScrollView;

public class ExamCardBean {
    private static int cardId = 2;
    private static String cardClass = "Exam";
    int exam_icon;
    String exam_title;
    String exam_address;
    String exam_date;
    String exam_time;
    String exam_deadline;

    public ExamCardBean() {
        this.exam_icon = R.drawable.exam_icon;
        this.exam_title = "";
        this.exam_address = "";
        this.exam_date = "";
        this.exam_time = "";
        this.exam_deadline = "";
    }

    public static int getCardId() {
        return cardId;
    }

    public static String getCardClass() {
        return cardClass;
    }

    public String getExamDate() {
        return exam_date;
    }

    public void setExamDate(String exam_date) {
        this.exam_date = exam_date;
    }

    public String getExamDeadline() {
        return exam_deadline;
    }

    public void setExamDeadline(String exam_deadline) {
        this.exam_deadline = exam_deadline;
    }

    public int getExamIcon() {
        return exam_icon;
    }

    public void setExamIcon(int exam_icon) {
        this.exam_icon = exam_icon;
    }

    public String getExamTitle() {
        return exam_title;
    }

    public void setExamTitle(String exam_title) {
        this.exam_title = exam_title;
    }

    public String getExamTime() {
        return exam_time;
    }

    public void setExamTime(String exam_time) {
        this.exam_time = exam_time;
    }

    public String getExamAddress() {
        return exam_address;
    }

    public void setExamAddress(String exam_address) {
        this.exam_address = exam_address;
    }

    public void insertTo(CardHorizontalScrollView v) {
        ImageView exam_icon = (ImageView) v.findViewById(R.id.exam_icon);
        TextView exam_title = (TextView) v.findViewById(R.id.exam_title);
        TextView exam_address = (TextView) v.findViewById(R.id.exam_address);
        TextView exam_date = (TextView) v.findViewById(R.id.exam_date);
        TextView exam_time = (TextView) v.findViewById(R.id.exam_time);
        TextView exam_deadline = (TextView) v.findViewById(R.id.exam_deadline);

        exam_icon.setImageResource(this.getExamIcon());
        exam_title.setText(this.getExamTitle());
        exam_address.setText(this.getExamAddress());
        exam_date.setText(this.getExamDate());
        exam_time.setText(this.getExamTime());
        exam_deadline.setText(this.getExamDeadline());
    }
}
